import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from '@/App.vue'
// 国际化配置
//@ts-expect-error ts类型检查错误
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// 导入svg
import 'virtual:svg-icons-register'
// 全局注册组件
import CommonComponent from '@/components/index'
// 引入css样式
import '@/style/index.scss'
// 引入路由
import router from '@/router/index'
// 引入仓库
import store from './store'
// 引入导航守卫
import './permisstion'
// 导入暗黑模式
import 'element-plus/theme-chalk/dark/css-vars.css'
const app = createApp(App)
app.use(ElementPlus, {
  locale: zhCn,
})
app.use(CommonComponent)
app.use(router)
app.use(store)
app.mount('#app')

// 通过import.meta.env获取环境变量
// console.log(import.meta.env)
